﻿using Autofac;
using System.Reflection;

namespace DFGJ.WMS_PDA.WebAPI.Utility
{
    public class AutoFacManage : Autofac.Module
    {
        protected override void Load(ContainerBuilder builder)
        {
            var iapiservice = Assembly.Load("DFGK_WMS.Repository");

            builder.RegisterAssemblyTypes(iapiservice).Where(t => t.Name.EndsWith("Repository")||t.Name.EndsWith("Service")).AsImplementedInterfaces();


        }
    }
}
